<?php

namespace app\admin\validate;

use app\common\lib\Captcha;
use think\Validate;

class Video extends Validate
{
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'url' => 'require',
        'video_url' => 'require',
        //'category_id' =>'require'
    ];

    protected $scene=[
        'create'=>['name','url','video_url'],
        'update'=>['id','name','url','video_url'],
    ];

    protected $message = [
        'id' => 'ID不能为空',
        'name' => '标题不能为空',
        'url' => '封面图不能为空',
        'video_url' => '视频不能为空',
        //'category_id' => '分类不能为空',
    ];
}
